/*
 * Created on Oct 15, 2004
 *
 */
package com.erclab.internal.xpresso.forms;

import java.util.*;

import com.erclab.internal.xpresso.Resource;
import com.erclab.internal.xpresso.datavalidators.DataValidationError;

/**
 * @author rodrigen
 *
 */
public class Form extends Resource implements java.io.Serializable{

	protected long idForm;
	protected String formName;
	protected String description;
	protected String title;
	protected String uniqueKeyName;
	protected String image;
	protected String forwardUrl;
	protected String style;
	protected String viewHandler;
	protected String parentKeyName;
	protected String submitText;
	protected String formHelperClass;
	protected String validationScript;
	protected FormHelper formHelper;
	protected FormParameters formParameters;
	protected ArrayList FormSections;
	protected ArrayList FormElements;
	protected DataValidationError validationError;
			
	/**
	 * @return
	 */
	public long getIdForm() {
		return idForm;
	}

	/**
	 * @return
	 */
	public java.lang.String getFormName() {
		return formName;
	}

	/**
	 * @param string
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return
	 */
	public ArrayList getFormElements() {
		return FormElements;
	}

	/**
	 * @return
	 */
	public java.lang.String getTitle() {
		return title;
	}

	/**
	 * @return
	 */
	public String getUniqueKeyName() {
		return uniqueKeyName;
	}

	/**
	 * @param string
	 */
	public void setDescription(java.lang.String string) {
		description = string;
	}

	/**
	 * @param elements
	 */
	public void setFormElements(ArrayList elements) {
		FormElements = elements;
	}

	/**
	 * @param string
	 */
	public void setFormName(java.lang.String string) {
		formName = string;
	}

	/**
	 * @param i
	 */
	public void setIdForm(long i) {
		idForm = i;
	}

	/**
	 * @param string
	 */
	public void setTitle(java.lang.String string) {
		title = string;
	}

	/**
	 * @param string
	 */
	public void setUniqueKeyName(String string) {
		uniqueKeyName = string;
	}

	/**
	 * @return
	 */
	public java.lang.String getImage() {
		return image;
	}

	/**
	 * @param string
	 */
	public void setImage(java.lang.String string) {
		image = string;
	}

	public String getForwardUrl(){
		return forwardUrl;
	}
    
	public void setForwardUrl(String f){
		forwardUrl = f;
	}
	
	public String toString(){
		StringBuffer bf = new StringBuffer();
		bf.append("idForm = " + this.idForm + "\n");
		bf.append("formName = " + this.formName + "\n");
		bf.append("category = " + this.category + "\n");
		bf.append("description = " + this.description + "\n");
		bf.append("title = " + this.title + "\n");
		bf.append("uniqueKeyName = " + this.uniqueKeyName + "\n");
		bf.append("forwardUrl = " + this.forwardUrl + "\n");
		return bf.toString();
	}


	/**
	 * @return
	 */
	public String getStyle() {
		return style;
	}

	/**
	 * @param string
	 */
	public void setStyle(String string) {
		style = string;
	}

	/**
	 * @return
	 */
	public String getViewHandler() {
		return viewHandler;
	}

	/**
	 * @param string
	 */
	public void setViewHandler(String string) {
		viewHandler = string;
	}

	/**
	 * @return
	 */
	public FormParameters getFormParameters() {
		return formParameters;
	}

	/**
	 * @param parameters
	 */
	public void setFormParameters(FormParameters parameters) {
		formParameters = parameters;
	}

	/**
	 * @return
	 */
	public String getParentKeyName() {
		return parentKeyName;
	}

	/**
	 * @param string
	 */
	public void setParentKeyName(String string) {
		parentKeyName = string;
	}

	/**
	 * @return
	 */
	public ArrayList getFormSections() {
		return FormSections;
	}

	/**
	 * @param list
	 */
	public void setFormSections(ArrayList list) {
		FormSections = list;
	}

	/**
	 * @return
	 */
	public String getValidationScript() {
		return validationScript;
	}

	/**
	 * @param string
	 */
	public void setValidationScript(String string) {
		validationScript = string;
	}

	/**
	 * @return
	 */
	public String getSubmitText() {
		return submitText;
	}

	/**
	 * @param string
	 */
	public void setSubmitText(String string) {
		submitText = string;
	}

	/**
	 * @return
	 */
	public FormHelper getFormHelper() {
		return formHelper;
	}

	/**
	 * @return
	 */
	public String getFormHelperClass() {
		return formHelperClass;
	}

	/**
	 * @param helper
	 */
	public void setFormHelper(FormHelper helper) {
		formHelper = helper;
	}

	/**
	 * @param string
	 */
	public void setFormHelperClass(String string) {
		formHelperClass = string;
	}

	public DataValidationError getValidationError() {
		return validationError;
	}

	public void setValidationError(DataValidationError validationError) {
		this.validationError = validationError;
	}

}
